﻿namespace Blaze.Framework.MonoEventListeners
{
    using UnityEngine;

    public class Collision : MonoBehaviour
    {
        public event CollisionEventHandler OnCollisionEnterEvent;

        public event CollisionEventHandler OnCollisionExitEvent;

        public event CollisionEventHandler OnCollisionStayEvent;

        private void OnCollisionEnter(UnityEngine.Collision collision)
        {
            if (OnCollisionEnterEvent != null)
                OnCollisionEnterEvent(gameObject, collision);
        }

        private void OnCollisionExit(UnityEngine.Collision collision)
        {
            if (OnCollisionExitEvent != null)
                OnCollisionExitEvent(gameObject, collision);
        }

        private void OnCollisionStay(UnityEngine.Collision collision)
        {
            if (OnCollisionStayEvent != null)
                OnCollisionStayEvent(gameObject, collision);
        }
    }
}